package org.dding.core.manager;

import java.io.IOException;
import java.util.List;

import org.dding.core.Lifecycle;
import org.dding.msc.service.ServiceController;
import org.dding.msc.service.ServiceName;

public interface IServiceManager extends Lifecycle {

	public static final String _SYSTEM_SERVICE = "$system.";

	ServiceController<?> getService(String serviceName);

	boolean isServiceExist(String serviceName);

	void registerServices(String moduleIdentifer);

	void unregisterServices(String moduleIdentifer);

	List<ServiceName> getServiceNames();

	boolean loadServices(String moduleIdentifer, boolean unzip) throws IOException;

	boolean stopService(String serviceName);

	boolean startService(String serviceName);

	boolean removeService(String serviceName);

	boolean waitService(String serviceName);

	void setModuleManager(IModuleManager moduleManager);

	IModuleManager getModuleManager();

	boolean unloadServices(String moduleName);

	boolean unloadServices(String moduleName, boolean delete);

	String getName();

}
